package com.tyfspring.beans.support;

import com.tyfspring.beans.exception.BeansException;
import com.tyfspring.beans.factory.BeanDefinitionRegistry;
import com.tyfspring.core.io.Resource;
import com.tyfspring.core.io.ResourceLoader;

/**
 * @Description BeanDefinition读取接口
 * @Author shallow
 * @Date 2023/4/5 3:17
 */

public interface BeanDefinitionReader {
    //这两个方法用于提供给后三个方法的工具，加载，注册
    //实现包装到抽象类中
    BeanDefinitionRegistry getRegistry();

    ResourceLoader getResourceLoader();

    void loadBeanDefinitions(Resource resource) throws BeansException;

    void loadBeanDefinitions(Resource... resources) throws BeansException;

    void loadBeanDefinitions(String location) throws BeansException;

    void loadBeanDefinitions(String... locations) throws BeansException;
}
